<template>
  <div class="open-member-ship-bg" v-if="visible">
    <div class="open-member-ship">
      <div class="member-header">
        <div class="blank"></div>
        <div class="memeber-title">开通会员</div>
        <i class="close-icon btn" @click="close"></i>
      </div>
      <div class="member-body">
        <p class="description-text">
          正在为<span> 2 </span>所学校, 含<span> 45 </span>个班级,<span>
            1450 </span
          >位学生开通精准教学会员试用期
        </p>

        <div class="date-picker-wrapper">
          <span class="title">会员有效截止日期：</span>
          <el-date-picker
            v-model="startDate"
            type="datetime"
            placeholder="选择日期时间"
          >
          </el-date-picker>
        </div>
        <div class="date-text">
          <span class="title">会员有效期：</span>
          <span>7天</span>
        </div>
      </div>
      <div class="member-footer">
        <div class="cancel-btn btn" @click="close">取消</div>
        <div class="confirm-btn btn">确认</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["visible"],
  data() {
    return {
      startDate: "",
    };
  },
  methods: {
    close() {
      this.$emit("update:visible", false);
    },
  },
};
</script>

<style lang='less' scoped>
.open-member-ship-bg {
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.2);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 996;
  .open-member-ship {
    width: 855px;
    height: 463px;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    color: #666;
    background-image: linear-gradient(#fff, #fff),
      linear-gradient(#fff, #fff);
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.07);
    border-radius: 6px;

    .member-header {
      height: 66px;
      padding: 0 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      font-size: 20px;
      .close-icon {
        width: 14px;
        height: 14px;
        background: url("@/assets/image/common/关闭.png") center no-repeat;
      }
    }
    .member-body {
      box-sizing: border-box;
      width: 100%;
      height: calc(100% - 166px);
      padding: 40px;
      font-size: 20px;
      line-height: 50px;
      .description-text {
        letter-spacing: 1px;
        span {
          color: #009cff;
        }
      }
      .date-picker-wrapper {
        margin-top: 40px;
      }
      .date-picker-wrapper,
      .date-text {
        display: flex;
        .title {
          display: inline-block;
          width: 50%;
          text-align: right;
        }
      }
    }
    .member-footer {
      height: 100px;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 16px;
      .btn {
        width: 118px;
        height: 38px;
        line-height: 40px;
        float: left;
        letter-spacing: 2px;
        border-radius: 4px;
        border: solid 1px #f5f5f5;
      }
      .cancel-btn {
        margin-right: 20px;
        background-color: #fff;
        color: #b3b3b3;
      }
      .confirm-btn {
        background-color: #009cff;
        color: #fff;
      }
    }
  }
}
</style>
